<!-- 通用头部 -->
<template>
	<view :style="{'height': headerHeight+'px'}">
		<view class="custom flex_center" :style="{'paddingTop': barHeight+'px'}">
			<view class="nav" @click="backClick()">
				<image class="nav-img" src="https://bac-miniprogram.oss-cn-beijing.aliyuncs.com/images/icon/back_icon.png" mode="widthFix"></image>
			</view>
		</view>
		<view class="empty_custom" :style="{'paddingTop': barHeight+'px'}"></view>
	</view>
</template>

<script setup>
	import { useStore } from "vuex";
	import { ref,watch } from "vue";
	const store = useStore()
	const barHeight = ref(store.state.barHeight)
	const headerHeight = ref(store.state.headerHeight)
	const props = defineProps({
		title: {
			type: String,
			default: ">>BAC"
		},
		desc:{
			type: String,
			default:"BRITA ART COMMUNITY"
		},
		pageName:{
			type: String,
			default:""
		}
	})
	// 返回上一页
	const backClick = ()=>{
		uni.navigateBack({
		    delta: 1
		});
	}
</script>

<style scoped lang="scss">
	@import "../../static/fonts.css";

	.custom {
	  position: fixed;
	  width: 100%;
	  top: 0;
	  left: 0;
	  /* height: 45px; */
	  z-index: 999;
	  padding-bottom: 10rpx;
	  background: #fff;
	}
	.nav{
	  float: left;
	  margin-left: 46rpx;
	  margin-top: 22rpx;
	  margin-right: 15rpx;
	  display: block;
	  .nav-img {
		  width: 48rpx;
		  height: 48px;
	  }
	}

</style>